# -*- coding: utf-8 -*-
# Author: xiantingDeng
# File: 03_大文件的处理方式.py
# Time: 22:38

# 通过read(1024)慢慢读取文件写入，直到len(content) == 0 则break 防止程序奔溃
with open("../03_函数/01_定义函数.py","r",encoding="utf-8") as f:
    while True:
        content = f.read(1024)
        if len(content) == 0:
            break
        s = open("content.txt","a+",encoding="utf-8")
        s.write(content)

